import javax.swing.JPanel;

public class Repaint extends JPanel implements Runnable {
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	Map map;

	private boolean runflg = true;

	Repaint(Map m){
		map = m;
	}

	public void run(){
		while(runflg){
			map.repaint();
			try{
				Thread.sleep(10);
			}catch(Exception e){
				e.printStackTrace();
			}
		}
	}
	public void fin(){
		runflg = false;
	}

/*	public void paint(Graphics g) {
		g.setColor(Color.BLACK);
		g.fillRect(0, 0, 500, 500);
		for (int i = 0; i <= 7; i++) {
			for (int j = 0; j <= 7; j++) {
				map.block = map.b.randomize(map.map[i][j]);
				g.drawImage(map.block, 50 * (i + 1), 50 * (j + 1), this);
			}
		}
	}
	*/
}
